<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="DC.Type" content="topic">
  <meta name="DC.Title" content="步骤1：开启HDFS目录的快照功能">
  <meta name="product" content="">
  <meta name="DC.Relation" scheme="URI" content="hdfs_00011.html">
  <meta name="prodname" content="">
  <meta name="version" content="">
  <meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
  <meta name="DC.Publisher" content="20240320">
  <meta name="prodname" content="csbs">
  <meta name="documenttype" content="usermanual">
  <meta name="DC.Format" content="XHTML">
  <meta name="DC.Identifier" content="hdfs_00012">
  <meta name="DC.Language" content="zh-cn">
  <link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
  <title>步骤1：开启HDFS目录的快照功能</title>
 </head>
 <body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px">
  <a name="hdfs_00012"></a><a name="hdfs_00012"></a>
  <h1 class="topictitle1">步骤1：开启HDFS目录的快照功能</h1>
  <div>
   <p>执行保护前，需要先参考本节对要保护的HDFS文件所在目录开启快照功能。</p>
   <div class="section">
    <h4 class="sectiontitle">操作步骤</h4>
    <ol>
     <li><span>使用PuTTY工具，登录大数据集群中的任一NameNode节点。</span></li>
     <li><span>以root账户执行以下2条命令开启目录的快照功能。</span><p></p><pre class="screen"><span style="color:#666666;">source </span><em style="color:#666666;">安装目录</em><span style="color:#666666;">/bigdata_env</span></pre> <pre class="screen">hdfs dfsadmin -allowSnapshot <em>directory_name</em></pre> <p>其中，<em>directory_name</em>为要保护的文件集的父目录。请参见<a href="zh-cn_topic_0000002024918278.html">管理快照</a>章节管理快照。</p> <p>当回显类似如下信息时，表示HDFS目录的快照功能已成功开启。</p> <pre class="screen">[rootenrs1 hadoopclient]# hdfs dfsadmin -allowSnapshot /
Allowing snapshot on / succeeded</pre> <p></p></li>
    </ol>
   </div>
  </div>
  <div>
   <div class="familylinks">
    <div class="parentlink">
     <strong>父主题：</strong> <a href="hdfs_00011.html">备份HDFS文件集</a>
    </div>
   </div>
  </div>
 </body>
</html>